USE [NLKHCNData]
GO

/****** Object:  View [dbo].[SearchChuyenGiaView]    Script Date: 1/17/2014 10:32:17 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [dbo].[SearchChuyenGiaView]
AS
SELECT        ISNULL(CT.Id, 0) AS CongTrinhId, CG.Id, CG.HoTen, CG.DiaChiDonVi, HH.Ten AS TenHocHam, HV.Ten AS TenHocVi, CG.TenDonVi, CG.HocHamId, CG.HocViId, 
                         LV.Ten AS TenLinhVuc, CG.LinhVucId, CT.TenCongTrinh
FROM            dbo.ChuyenGia AS CG LEFT OUTER JOIN
                         dbo.LinhVuc AS LV ON CG.LinhVucId = LV.Id LEFT OUTER JOIN
                         dbo.HocHam AS HH ON CG.HocHamId = HH.Id LEFT OUTER JOIN
                         dbo.HocVi AS HV ON CG.HocViId = HV.Id LEFT OUTER JOIN
                         dbo.CongTrinhNghienCuu AS CT ON CG.Id = CT.ChuyenGiaId

GO


